import {
    movieRequest, //引入请求电影api
} from '../../api/index'

import {
    GETMOVIELISE
} from '../constnant/movieConst' //引入type常量

import store from '../store'; //引入store dispatch



//获取电影列表的action
export const getMovieAction = () => {
    return async () => {
        const re = await movieRequest();
        store.dispatch({
            type: GETMOVIELISE,
            data: re.data.data.list
        })
    }
}